home *** CD-ROM | disk | FTP | other *** search
- //=====================================================================================
- // Windows Interface Contruction Set
- // Version 1.00
- //
- // FONTSEL.CPP - Font Selection Control Class
- // Copyright ⌐ 1993 by Microdyne Development Technologies
- // All rights reserved.
- //=====================================================================================
-
- #include <fontsel.h>
- #include <wics.h>
-
- TFontSelect::TFontSelect (PTWindowsObject AParent, int AnId, int X, int Y)
- : TControl(AParent, AnId, "", X, Y, 220, 24)
-
- {
- Attr.Style = WS_CHILD | WS_VISIBLE ;
- }
-
- TFontSelect::~TFontSelect ()
- {
- }
-
- void TFontSelect::GetFamilyName (WORD cchMax, LPSTR lpFamilyName)
- {
- SendMessage (HWindow, FSM_GETFONTFAMILY, cchMax, (LPARAM) lpFamilyName);
- }
-
- int TFontSelect::GetFontSize ()
- {
- return (int) SendMessage(HWindow, FSM_GETFONTSIZE, 0, 0L);
- }
-
- void TFontSelect::SetFamilyName (LPSTR lpFamilyName)
- {
- SendMessage (HWindow, FSM_SETFONTFAMILY, 0, (LPARAM) lpFamilyName);
- }
-
- void TFontSelect::SetFamilyCommandCode (WORD code)
- {
- SendMessage (HWindow, FSM_SETFONTCOMMANDCODE, code, 0L);
- }
-
- void TFontSelect::SetFontSize (int iPointSize)
- {
- SendMessage (HWindow, FSM_SETFONTSIZE, iPointSize, 0L);
- }
-
- void TFontSelect::SetFontSizeCommandCode (WORD code)
- {
- SendMessage (HWindow, FSM_SETSIZECOMMANDCODE, code, 0L);
- }
-
- void TFontSelect::WMDrawItem (RTMessage msg)
- {
- DefWndProc(msg);
- }